/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.elookinto.blackhat;

import java.io.PrintStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author zw251y
 */
public class Util {

	public static PrintStream getPS() {
		try {
			return new PrintStream(System.out, true, "UTF-8");
		} catch (Exception e) {
			return null;
		}
	}
    public static Connection getCon() {
        Connection con = null;
        try {
            con = DriverManager.getConnection("jdbc:h2:/opt/hs2/linkedin", "SA", "");

        } catch (SQLException e) {
            e.printStackTrace();
        }
        return con;
    }

    static {

        try {
            Class.forName("org.h2.Driver");

        } catch (ClassNotFoundException e) {
            e.printStackTrace(System.out);
        }
    }
}
